<?php


    class jwSocketComponents extends sfActions
    {
        public function executeSocket( sfRequest $request )
        {
            $culture = $this->getUser()->getCulture();
            
            $this->socket = jwSocketPeer::retrieveByPK( $this->id, $culture );
            if ( !$this->socket )
            {
                $this->socket = new jwSocket();
                $this->socket->setCulture( $culture );
                $this->socket->setId( $this->id );
                $this->socket->save();
            }
            
            return sfView::SUCCESS;
        }
    }

?>